package com.spsoft.workflow.model.dto.json;

import com.alibaba.fastjson.JSONObject;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * process: "
 * {\"id\":\"root\",\
 * "parentId\":null,\
 * "type\":\"ROOT\",\
 * "name\":\"发起人\",\
 * "desc\":\"任何人\",\
 * "props\":{\
 * "assignedUser\":
 * <p>
 * <p>
 * [{\"id\":1486186,\"name\":\"xx科技有限公司\",\"type\":\"dept\",\"sex\":null,\"selected\":false}],\
 * "formPerms\":[{\"id\":\"field6131501574832\",\"title\":\"单行文本输入\",\"required\":true,\"perm\":\"E\"}]},\
 * "children\":{\"id\":\"node_040730749764\",\"parentId\":\"root\",\"props\":{\"assignedType\":\"ASSIGN_USER\",\"mode\":\"AND\",\"sign\":true,\"nobody\":{\"handler\":\"TO_PASS\",\"assignedUser\":[]},\"timeLimit\":{\"timeout\":{\"unit\":\"H\",\"value\":\"1\"},\"handler\":{\"type\":\"REFUSE\",\"notify\":{\"once\":true,\"hour\":1}}},\"assignedUser\":[{\"id\":381496,\"name\":\"旅人\",\"type\":\"user\",\"sex\":false,\"selected\":false}],\"formPerms\":[{\"id\":\"field6131501574832\",\"title\":\"单行文本输入\",\"required\":true,\"perm\":\"R\"}],\"selfSelect\":{\"multiple\":false},\"leaderTop\":{\"endCondition\":\"TOP\",\"endLevel\":1},\"leader\":{\"level\":1},\"role\":[],\"refuse\":{\"type\":\"TO_END\",\"target\":\"\"},\"formUser\":\"\"},\"type\":\"APPROVAL\",\"name\":\"审批人\",\"children\":{}}}"
 */
@Data
public class ChildNode implements Serializable {
    private static final long serialVersionUID = 1378442239374127249L;
    private String id;
    private String parentId;
    private String type;
    private String name;
    private String desc;
    private Properties props;
    private ChildNode children;
    private List<ChildNode> branchs;
    /**
     * 是否是并行网关内的节点
     */
    private Boolean parallelNode;
    /**
     * 正在运行
     */
    private Boolean running;
    private JSONObject incoming = new JSONObject();
}

